import React from 'react';
import Redirect from 'umi/redirect';

export default ({ children }) => {
  let antd = localStorage.getItem('antd-pro-authority');
  if (!antd) {
    return <Redirect to="/user/login"/>;
  }
  return children;
};
